package com.example.forum.services;

import com.example.forum.exception.CustomException;
import com.example.forum.vo.MessageVO;

import java.util.List;

public interface IMessageService {

    /**
     * 发送消息
     *
     * @param receiveUserId
     * @param content
     * @param postUserId
     */
    void send(Long receiveUserId, String content, Long postUserId) throws CustomException;

    /**
     * 获取所有消息
     *
     * @param userId
     * @return
     */
    List<MessageVO> getAll(Long userId) throws CustomException;

    /**
     * 获取未读消息数量
     *
     * @param userId
     * @return
     */
    Integer getUnreadCount(Long userId) throws CustomException;

    /**
     * 标记已读
     *
     * @param id
     * @param userId
     */
    void markRead(Long id, Long userId) throws CustomException;

    /**
     * 回复消息
     *
     * @param repliedId
     * @param content
     */
    void reply(Long repliedId, String content, Long userId) throws CustomException;
}
